<template>
  <div class="main-page">
    <Header />
    <router-view></router-view>
    <Footer />
  </div>
</template>

<script>
import Footer from 'components/Footer.vue';
import Header from 'components/Header.vue';

export default {
  name: 'App',
  components: {
    Footer,
    Header
  },
  watch: {
    $route(to){
      const target = to.path;
      const ifHideHeader = target.includes('/personal');
      this.$store.commit("setShowHeaderFlag", ifHideHeader);
    }
  },
  beforeUnmount() {
    // 销毁前把前十条咨询入缓存
  }
}
</script>

<style>
html,
body {
  line-height: normal;
  height: 100vh;
  overflow: hidden;
  font-size: 12px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
*::-webkit-scrollbar { display:none; }


#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  width: 100vw;
  height: 100%;
}
.main-page {
  width: 100%;
  height: 100%;
}
</style>
